projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1a6411
)
(Freplace_match): Set OPOINT clearly for the case
author
Richard M. Stallman
<rms@gnu.org>
Tue, 1 Dec 1998 05:17:11 +0000
(
05:17
+0000)
committer
Richard M. Stallman
<rms@gnu.org>
Tue, 1 Dec 1998 05:17:11 +0000
(
05:17
+0000)
where point is in the middle of the text to be replaced.
src/search.c
patch
|
blob
|
history
diff --git
a/src/search.c
b/src/search.c
index 29a6fe4ff4fb99cb3791a27ea2dca78ecaca3596..e4877b5f498c8af1ba6a12d78aff5e64b1be8b59 100644
(file)
--- a/
src/search.c
+++ b/
src/search.c
@@
-2417,8
+2417,10
@@
since only regular expressions have distinguished subexpressions.")
}
/* Record point, the move (quietly) to the start of the match. */
- if (PT >
search_regs.start
[sub])
+ if (PT >
= search_regs.end
[sub])
opoint = PT - ZV;
+ else if (PT > search_regs.start[sub])
+ opoint = search_regs.end[sub] - ZV;
else
opoint = PT;